using System;
using System.Collections.Generic;
using System.Text;
using DataTreeLib;

namespace DocToolTipLib.Mappers
{
  public class TypeFilterTNodeMapper : ITreeNodeMapper
  {
    #region ITreeNodeMapper Members

    public System.Windows.Forms.ContextMenuStrip GetContextMenuStrip(System.Windows.Forms.TreeNode treeNode)
    {
      return null;
    }

    public object GetNodeInfo(System.Windows.Forms.TreeNode treeNode)
    {
      return treeNode.Tag;
    }

    public void UpdateNode(object dataNode, System.Windows.Forms.TreeNode treeNode)
    {
      TypeFilterTNode dNode = dataNode as TypeFilterTNode;
      if (dNode != null)
      {
        treeNode.Text = string.Format("{0} : {1}", dNode.Value.Name, dNode.Value.FullName);
        treeNode.Tag = dNode;
      }

    }

    #endregion

  }
}
